import {baseUrl, request} from "@/network/request";

export const uploadUserAvatar = baseUrl + '/user/upLoadUserAvatar';

export function updateNickname(nickname, username) {
  return request({
    url: '/user/updateNickname',
    method: 'post',
    params: {
      nickname,
      username
    }
  })
}

export function changePassword(oldPassword, password, username) {
  return request({
    url: '/user/changePassword',
    method: 'post',
    params: {
      oldPassword,
      password,
      username
    }
  })
}

export function logOut(userId) {
  return request({
    url: '/user/logOut',
    params: {
      userId
    }
  })
}